package com.wxy.demo.design_pattern.abstract_factory;

/**
 * <p>
 * 抽象工厂模式
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/11/4 9:58
 */
public class Demo {
    public static void main(String[] args) {
        FactoryProducer producer = new FactoryProducer();

        PcFactory factory = producer.getFactory("hp");
        factory.getKeyboard().show();
        factory.getMouse().show();

        PcFactory factory1 = producer.getFactory("dell");
        factory1.getKeyboard().show();
        factory1.getMouse().show();
    }
}
